class Order
  include Mongoid::Document
  include Mongoid::Timestamps # adds created_at and updated_at fields

  # field <name>, :type => <type>, :default => <value>

  belongs_to :user
  has_many :order_products

  field :seller, :type => String
  field :status, :type => String
  field :amount, :type => BigDecimal
  field :is_close, :type => Boolean
  field :customer_mobile, :type => String


  # You can define indexes on documents using the index macro:
  # index :field <, :unique => true>

  # You can create a composite key in mongoid to replace the default id using the key macro:
  # key :field <, :another_field, :one_more ....>
end
